package com.dfbz.bigdata.modules.system.controller;


import com.dfbz.bigdata.common.utils.R;
import com.dfbz.bigdata.modules.system.doman.CommonSafe;
import com.dfbz.bigdata.modules.system.service.CommonSafeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/safe")
public class CommonSafeController {

    @Autowired
    private CommonSafeService commonSafeService;

    @GetMapping("/{safeId}")
    public R<CommonSafe> getByIdSafe(@PathVariable("safeId") Long safeId){

        CommonSafe commonSafe = commonSafeService.getById(safeId);

        return R.success(commonSafe);
    }
}
